<template>

</template>

<script setup>


function delay(){
new Promise(resolve => setTimeout(resolve, 5000))
}

(async() => { 
    await delay(5000)
    // 等待输出五秒后输出
    console.log("五秒到了")
})()
</script>

<style lang="scss" scoped></style>